<link rel="stylesheet" href="/css/other.css" type="text/css" />

<%= render "cip/pages/banner" %>
<div class="grid ovf clear">
  <%= render "cip/pages/sidebar" %>

  <div class="fr-box fr ovf">
    <div class="bread fl c0b f14"><a href="/">首页</a><span> > </span><% @category.ancestors.each do |category| %><a href="<%= cip_category_path(category) %>"><%= category.title %></a><span> > </span><% end %><a href="<%= cip_category_path(@category) %>"><%= @category.title %></a><span> > </span><a href="<%= cip_page_path(@page) %>"><%= @page.title %></a></div>
    <div class="text fl clear">
      <div class="title fl">
        <h1 class="f30 fyh"><%= @page.title %></h1>
        <span class="fyh  oth">发表日期：<%= l @page.created_at, format: :long %> &nbsp;&nbsp;&nbsp; 文章编辑：<%= @page.author %> &nbsp;&nbsp;&nbsp;  浏览次数：<%= @page.view_count || 0 %></span>
      </div>
      <div class="clear fl main-txt f14">
        <%= raw @page.content %>
      </div>
      <div class="clear">
        <span class="fr" style="line-height: 24px; margin: 6px 6px 6px 0;">
          <% page_scope = Cip::Page.where(forwarding_type: :normal).order(:id) %>
          <% @prev = page_scope.where("id < ?", @page.id).last %>
          <span style="margin-right: 25px;">上一篇： <%= @prev ? link_to(@prev.title, @prev.url) : "没有了" %></span>

          <% @next = page_scope.where("id > ?", @page.id).first %>
          <span>下一篇： <%= @next ? link_to(@next.title, @next.url) : "没有了" %></span>
        </span>

        <!-- Baidu Button BEGIN -->
        <div class="bdsharebuttonbox">
          <label style="float: left; line-height: 24px; margin: 6px 6px 6px 0;">分享到：</label>
          <a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
          <a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
          <a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a>
          <a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a>
          <a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
          <a href="#" class="bds_more" data-cmd="more"></a>
        </div>
        <script type="text/javascript">window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"24"},"share":{},"image":{"viewList":["qzone","tsina","tqq","renren","weixin"],"viewText":"分享到：","viewSize":"24"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
        <!-- Baidu Button END -->
      </div>
      <div class="clear">
        <!--PC版-->
        <div id="SOHUCS" sid="<%= Digest::SHA1.hexdigest(@page.id.to_s) %>"></div>
        <script charset="utf-8" type="text/javascript" src="https://changyan.sohu.com/upload/changyan.js" ></script>
        <script type="text/javascript">window.changyan.api.config({"appid":"cysTjdpj9","conf":"prod_740cb77ac3be73fa2bc39aac3f0bfe73"});</script>
      </div>
    </div>
  </div>
</div>
